/*
 * @FilePath     : /study_code/layui/treetable-lay/common.js
 * @Description  : 公用
 * @Date         : 2025-04-14 15:45:25
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-15 09:05:29
 */

// 用 “单一变量“原则，理解示例的配置项
const defaultConfig = {
  elem: '#table1',
  treeColIndex: 1,
  treeSpid: -1,
  treeIdName: 'id',
  treePidName: 'pid',
  treeDefaultClose: true,
  treeLinkage: false,
  url: '/layui/treetable-lay/json/data.json',
  page: false,
  cols: [
    [
      { type: 'numbers' },
      { field: 'name', title: 'name' },
      { field: 'id', title: 'id' },
      { field: 'sex', title: 'sex' },
      { field: 'pid', title: 'pid' },
      // { templet: '#oper-col', title: 'oper' },
    ],
  ],
  done: function () {
    // layer.closeAll('loading')
  },
}